<template>
  <div>
    <SectionTitle :title="'Knowledge base'"/>
    <div class="knowledge-wrapper">
      <div class="knowledge-content">
        <h4>知识库领域</h4>
        <div class="knowledge-cards">
          <ul>
            <li v-for="item in cards1" :key="item.name" :style="{borderColor: item.color}">
              <h1 :style="{color: item.color}">
                {{item.name}}
                <div :style="{backgroundColor: item.color}"></div>
              </h1>
              <h6>{{item.desc}}</h6>
            </li>
          </ul>
        </div>

        <div class="knowledge-cards">
          <ul>
            <li v-for="item in cards2" :key="item.name" :style="{borderColor: item.color}">
              <h1 :style="{color: item.color}">
                {{item.name}}
                <div :style="{backgroundColor: item.color}"></div>
              </h1>
              <h6>{{item.desc}}</h6>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import SectionTitle from './SectionTitle';

  export default {
    name: "KnowledgeBase",
    data() {
      return {
        cards1: [
          {name: 'ERP', desc: 'ERP 企业资源系统', color: '#FFB224'},
          {name: 'FMS', desc: 'FMS 财务系统', color: '#02D0FF'},
          {name: 'BPM', desc: 'BPM 业务流程系统', color: '#FFB224'},
          {name: 'DMS', desc: 'DMS 文档系统', color: '#02D0FF'}
        ],
        cards2: [
          {name: 'KM', desc: 'KM 只是管理系统', color: '#02D0FF'},
          {name: 'CC', desc: 'CC  协同管理系统', color: '#FFB224'},
          {name: 'PDM', desc: 'PDM产品数据管理系统', color: '#02D0FF'}
        ]
      };
    },
    components: {
      SectionTitle
    }
  };
</script>

<style lang="less">
  @import "../assets/css/vars";

  .knowledge-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-top: 50px;
    padding-bottom: 100px;
    .knowledge-content {
      width: 60%;
      padding: 40px 0;
      border: 1px solid @baseColor;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      h4 {
        position: absolute;
        top: -16px;
        left: 50%;
        transform: translateX(-50%);
        padding: 5px 10px;
        background-color: @bgColor;
      }

      .knowledge-cards {
        display: flex;
        justify-content: center;
        margin: 20px;

        ul {
          display: flex;
          justify-content: center;
          align-items: center;
          li {
            width: 140px;
            height: 160px;
            border: 1px solid;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            margin: 0 5px;
            h1 {
              position: relative;
              font-size: 55px;
              padding-bottom: 15px;
              div {
                position: absolute;
                top: 100%;
                left: 5%;
                width: 90%;
                height: 2px;
              }
            }
            h6 {
              margin-top: 20px;
            }
          }
        }
      }
    }
  }
  @media screen and (max-width: 768px) {
    .knowledge-wrapper {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      padding: 15px;
      .knowledge-content {
        width: 100%;
        padding: 40px 0;
        border: 1px solid @baseColor;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        h4 {
          position: absolute;
          top: -16px;
          left: 50%;
          transform: translateX(-50%);
          padding: 5px 10px;
          background-color: @bgColor;
        }

        .knowledge-cards {
          display: flex;
          justify-content: center;
          margin: 20px;

          ul {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            li {
              width: 140px;
              height: 160px;
              border: 1px solid;
              display: flex;
              justify-content: center;
              align-items: center;
              flex-direction: column;
              margin: 5px 5px;
              h1 {
                position: relative;
                font-size: 55px;
                padding-bottom: 15px;
                div {
                  position: absolute;
                  top: 100%;
                  left: 5%;
                  width: 90%;
                  height: 2px;
                }
              }
              h6 {
                margin-top: 20px;
              }
            }
          }
        }
      }
    }
  }
</style>
